//
//  EPMEmotionBtn.m
//  WeiBoByOC
//
//  Created by 马继鵬 on 17/4/7.
//  Copyright © 2017年 7TH. All rights reserved.
//

#import "EPMEmotionBtn.h"

@implementation EPMEmotionBtn

- (void)setEmotionModel:(EPMEmotionModel *)emotionModel
{
    _emotionModel = emotionModel;
    if (emotionModel.isEmoji){
        [self setTitle:[emotionModel.code emoji] forState:UIControlStateNormal];
        self.titleLabel.font = [UIFont systemFontOfSize:30];
        [self setImage:nil forState:UIControlStateNormal];
    }else{
        
        UIImage* img = [UIImage imageNamed:emotionModel.allPath inBundle:[EPMEmotionTool sheard].emotionBundle compatibleWithTraitCollection:nil];
        [self setImage:img forState:UIControlStateNormal];
        [self setTitle:nil forState:UIControlStateNormal];
    }
    
}

@end
